[BITS 32]

;-------------------------------------------------------------------------------
; Multiboot Header
;-------------------------------------------------------------------------------
MULTIBOOT_PAGE_ALIGN	equ 1<<0
MULTIBOOT_MEMORY_INFO	equ 1<<1
MULTIBOOT_AOUT_KLUDGE	equ 1<<16
MULTIBOOT_SIGNATURE		equ 0x1BADB002
MULTIBOOT_REPLY			equ 0x2BADB002
MULTIBOOT_FLAGS			equ MULTIBOOT_PAGE_ALIGN | MULTIBOOT_MEMORY_INFO | MULTIBOOT_AOUT_KLUDGE
MULTIBOOT_CHECKSUM		equ -( MULTIBOOT_SIGNATURE + MULTIBOOT_FLAGS )

extern code
extern bss
extern end
extern Kernel_Entry

section .init
align 4
Multiboot_Header:
	dd	MULTIBOOT_SIGNATURE			; u32	signature
	dd	MULTIBOOT_FLAGS				; u32	flags
	dd	MULTIBOOT_CHECKSUM			; u32	checksum
	dd	Multiboot_Header			; u32	header_addr 	(if flags[16] set)
	dd	code						; u32	load_addr		(if flags[16] set)
	dd	bss							; u32	load_end_addr	(if flags[16] set)
	dd	end							; u32	bss_end_addr	(if flags[16] set)
	dd	Kernel_Entry				; u32	entry_addr		(if flags[16] set)